package com.zzyx.service.impl;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;

import com.zzyx.bean.Chuzhen;
import com.zzyx.dao.ChuzhenDao;
import com.zzyx.service.ChuzhenService;

public class ChuzhenServiceImpl implements ChuzhenService {
	private ChuzhenDao chuzhenDao;

	public ChuzhenDao getYuyueDao() {
		return chuzhenDao;
	}

	public void setchuzhenDao(ChuzhenDao chuzhenDao) {
		this.chuzhenDao = chuzhenDao;
	}

	public void delete(Chuzhen e) {
		chuzhenDao.delete(e);
	}

	public void deleteAll(Collection<Chuzhen> c) {
		chuzhenDao.deleteAll(c);

	}

	public void deleteById(Class<Chuzhen> entityClass, Integer id) {
		chuzhenDao.deleteById(entityClass, id);

	}

	public List<Chuzhen> findAll(Class<Chuzhen> entityClass) {

		return chuzhenDao.findAll(entityClass);
	}

	public List<Chuzhen> findByAll(DetachedCriteria dc) {
		return chuzhenDao.findByAll(dc);
	}

	public List<Chuzhen> findByCriteria(DetachedCriteria dc, int firstResult,
			int maxResult) {
		return chuzhenDao.findByCriteria(dc, firstResult, maxResult);
	}

	public List<Chuzhen> findByCriteria(DetachedCriteria dc) {

		return chuzhenDao.findByCriteria(dc);
	}

	public List<Chuzhen> findByHql(String hql, Map<String, Object> param,
			int firstResult, int maxResult) {
		return chuzhenDao.findByHql(hql, param, firstResult, maxResult);
	}

	public Chuzhen findById(Class<Chuzhen> entityClass, Integer id) {
		return chuzhenDao.findById(entityClass, id);
	}

	public List<Chuzhen> findByProperty(Class<Chuzhen> entityClass,
			String propertyName, Object value, int type) {
		return chuzhenDao
				.findByProperty(entityClass, propertyName, value, type);
	}

	public Chuzhen findUniqueResult(String sql) {
		return chuzhenDao.findUniqueResult(sql);
	}

	public void save(Chuzhen entity) {
		chuzhenDao.save(entity);
	}

	public void saveOrUpdate(Chuzhen entity) {
		chuzhenDao.saveOrUpdate(entity);

	}

	public void update(Collection<Chuzhen> c) {
		chuzhenDao.update(c);

	}
	public List<Chuzhen>  findByHql(String hql){
		return chuzhenDao.findByHql(hql);
	}

	
	public void findDate(String string) {
		chuzhenDao.findDate(string);
		
	}

	
	public void update(Chuzhen cz) {
		chuzhenDao.update(cz);
		
	}

	
	public List<Chuzhen> findByHql(String hql, int start, int max) {
		// TODO Auto-generated method stub
		return chuzhenDao.findByHql(hql, start, max);
	}

}
